﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.InteropServices.JavaScript;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;

namespace Himp.Platform
{
    /// <summary>
    /// 消息接收记录
    /// </summary>
    public class EventMsgRecvRec : AuditedAggregateRoot<Guid>, IMultiTenant
    {
        /// <summary>
        /// 全路径
        /// </summary>
        public string TopicFullPath { get; set; }

        /// <summary>
        /// 消息类型
        /// </summary>
        public string MsgTopicName { get; set; }

        /// <summary>
        /// 消息内容
        /// </summary>
        public string MsgCont { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public EnumEventMsgOperStas EventMsgOperStas { get; set; }

        #region 消息内容

        ///// <summary>
        ///// 消息发送人ID
        ///// </summary>
        //[Column("MSG_SEND_USERID")]
        //public Guid? MsgSendUserid { get; set; }

        ///// <summary>
        ///// 消息发送人名称
        ///// </summary>
        //[Column("MSG_SEND_USERNAME")]
        //public string? MsgSendUsername { get; set; }

        ///// <summary>
        ///// 消息发送部门Id
        ///// </summary>
        //[Column("MSG_SEND_DEPTID")]
        //public Guid? MsgSendDeptid { get; set; }

        ///// <summary>
        ///// 消息发送科室名称
        ///// </summary>
        //[Column("MSG_SEND_DEPTNAME")]
        //public string? MsgSendDeptname { get; set; }

        ///// <summary>
        ///// 消息接收科室ID
        ///// </summary>
        //[Column("MSG_RECV_DEPTID")]
        //public string? MsgRecvDeptid { get; set; }

        ///// <summary>
        ///// 消息接收科室名称
        ///// </summary>
        //[Column("MSG_RECV_DEPTNAME")]
        //public string? MsgRecvDeptname { get; set; }

        ///// <summary>
        ///// 消息接收人员Id
        ///// </summary>
        //[Column("MSG_RECV_USERID")]
        //public Guid? MsgRecvUserid { get; set; }

        ///// <summary>
        ///// 消息接收人员Code
        ///// </summary>
        //[Column("MSG_RECV_USERNAME")]
        //public string? MsgRecvUsername { get; set; }

        ///// <summary>
        ///// 消息状态
        ///// </summary>
        //[Column("MSG_STATS")]
        //public EnumMsgStats MsgStats { get; set; }

        ///// <summary>
        ///// 消息接收方式
        ///// 默认
        ///// 锁屏
        ///// 报警
        ///// </summary>
        //[Column("MSG_LV")]
        //public EnumMsgLv MsgLv { get; set; }

        ///// <summary>
        ///// 业务编号
        ///// </summary>
        //[Column("BIZ_NO")]
        //public string? BizNo { get; set; }


        //public List<MsgReadRec>? MsgReadRecs { get; set; }

        #endregion

        /// <summary>
        /// 
        /// </summary>
        public Guid? TenantId { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public EventMsgRecvRec()
        { 
            
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="msgBizTypeId"></param>
        /// <param name="msgCont"></param>
        public EventMsgRecvRec(string topicFullPath, string msgTopicName, string msgCont)
        {
            TopicFullPath = topicFullPath;
            MsgTopicName = msgTopicName;
            MsgCont = msgCont;
            EventMsgOperStas = EnumEventMsgOperStas.未处理;
        }
    }
}
